<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="https://cdn.staticfile.org/vue/2.4.2/vue.min.js"></script> 
</head>

<body>
    <div id="app">
        <p>{{massge}}</p>
        <button v-on:click='reverse'>逆转消息</button>
        <button v-on:click='massge+=" " +massge'>修改</button>
        <button v-on:click='greet($event);'>welcome</button>
        <button onclick='w=vm.greet(event);'>welcome</button>
    </div>
    <script>
        var vm=new Vue({
           el:'#app',
           data:{
               massge:'你好哒哒哒',
               name:'nemo-tec.com'
           },
           methods:{
               reverse:function(event){
                   this.massge=this.massge.split('').reverse().join('');
                   alert(event.targrt.tagName)
               },
               greet:function(event){
                   alert(this.massge+'welcome to'+this.name);
                   alert(event.targrt.targrt)
               },
           }
           
        });
       
    </script>
</body>

</html>